{% extends "common/style.html" %} {% block content %}
<style>
    .rowtable tbody tr td {
        min-width: 240px;
        max-width: 300px;
    }
</style>

<form class=layui-form id="myform" action="">
    <div class=container1>
        <div class=header>
            <div class="Mytab">
                <table class="mytabstyle rowtable" style="width: 100%;overflow-x: scroll;">
                    <tr>
                        <td width="5%">
                            <p style="text-align: center;">*统一社会信用代码</p>
                        </td>
                        <td>
                            <p><input type="text" style="text-align: left;" value="自动带入，禁止修改" disabled /></p>
                        </td>
                        <td width="5%">
                            <p style="text-align: center;">*注册登记类型</p>
                        </td>
                        <td>
                            <p><input type="text" style="text-align: left;" value="自动带入，禁止修改" disabled /></p>
                        </td>
                        <td width="5%">
                            <p style="text-align: center;">操作</p>
                        </td>
                        <td>
                            <p class="chakan" style="cursor: pointer;">查看</p>
                        </td>
                    </tr>
                    <tr>
                        <td width="5%">
                            <p style="text-align: center;">*机构名称</p>
                        </td>
                        <td>
                            <p><input type="text" style="text-align: left;" value="自动带入，禁止修改" disabled /></p>
                        </td>
                        <td width="5%">
                            <p style="text-align: center;">*成立时间</p>
                        </td>
                        <td>
                            <p><input type="text" style="text-align: left;" value="自动带入，禁止修改" disabled/></p>
                        </td>
                        <td width="5%">
                            <p style="text-align: center;">操作</p>
                        </td>
                        <td>
                            <p class="edit" style="cursor: pointer;">编辑</p>
                        </td>
                    </tr>
                </table>
            </div>

        </div>

    </div>
</form>
<script src="/public/dist/page1.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form,
            layer = layui.layer,
            layedit = layui.layedit,
            laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value) {
                if (value.length < 5) {
                    return '标题至少得5个字符啊';
                }
            },
            pass: [/(.+){6,12}$/, '密码必须6到12位'],
            content: function(value) {
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data) {
            layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });
    });

    $('.darkbluebtn').on('click', function() {
        layer.open({
            type: 2,
            title: '新增',
            fix: false,
            maxmin: true,
            shadeClose: true,
            area: ['100%', '100%'],
            content: '/ssfw/add',
        });
    });
</script>

{% endblock %}